package ouyangye.student;

public class StudentG extends Student{

    private String name;
    private String id;
    private boolean isCET4Passed;
    private double lastYearScore;

    public StudentG(){
    }

    public StudentG(String name,String id,boolean isCET4Passed,double lastYearScore){
        this.name=name;
        this.id=id;
        this.isCET4Passed=isCET4Passed;
        this.lastYearScore=lastYearScore;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public void setCET4(boolean passed) {
        isCET4Passed = passed;
    }

    public void setLastYearScore(double score) {
        this.lastYearScore = score;
    }


    @Override
    public boolean isExcellent() {
        return isCET4Passed&&lastYearScore>=85;
    }

    @Override
    public void printInfo() {
        System.out.println("本科生姓名："+name+",学号："+id+",四级是否通过："+isCET4Passed+",去年成绩："+lastYearScore);
    }

}
